<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/2/1 0001
  Time: 9:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/include/taglibs.jsp" %>

<script src="${path}/static/taoshunda/auditing/selectTime.js"></script>
<script type="text/javascript" src="${path}/static/bootstrap/bootstrap-table/bootstrap-table.js"></script>
<link href="${path}/static/css/public/public.css" rel="stylesheet" type="text/css">

<div style="float: left">
    <button class="btn query_button" id="addTime" style="width: 200%;margin-bottom: 4%">
        添加
    </button>
</div>

<table id="table"
       data-toggle="table"
       data-url="${path}/web/time/querySelectTime"
       data-toolbar="#toolbar"
       data-side-pagination="server"
       data-pagination="true"
       data-page-list="[5, 10, 20, 50, 100, 200]"
>
    <thead>
    <tr>
        <th data-formatter="months">时间</th>
        <th data-field="money">价格(元)</th>
        <th data-formatter="type">类型</th>
        <th data-formatter="Formatter" data-events="Event">操作</th>
    </tr>
    </thead>
</table>


<div id="addSelectTime-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="50%">
    <div class="box-header">
        <h3 class="box-title">添加时间价格</h3>
    </div>
    <div class="box box-info">
        <div class="box-body">
            <form role="form" method="post" id="addTimeFrom">

                <div class="form-group">
                    <label>类型:</label>
                    <input type="hidden" name="type" id="types">
                    <select class="form-control entry" id="type" style="width: 50%" onchange="showTime()">
                        <option value="0">--类型--</option>
                        <option value="1">首页轮播图</option>
                        <option value="2">推荐商家</option>
                        <option value="3">商品特价</option>
                        <option value="4">红包广告位</option>
                    </select>
                </div>

                <div class="form-group" id="show1" style="display: none">
                    <label>时间(月):</label><br>
                    <input type="text" class="form-control entry" id="time" name="months" style="width: 50%">
                </div>

                <div class="form-group" id="show2" style="display: none">
                    <label>时间(天):</label><br>
                    <input type="text" class="form-control entry" id="times" name="monthsTwo" style="width: 50%">
                </div>

                <div class="form-group">
                    <label>价格(元):</label><br>
                    <input type="text" class="form-control entry" id="price" name="money" style="width: 50%">
                </div>
                <div class="form-group">
                    <label>原价(元):</label><br>
                    <input type="text" class="form-control entry" id="oldPrice" name="oldMoney" style="width: 50%">
                </div>
                <div class="form-group">
                    <label>特价描述:</label><br>
                    <input type="text" class="form-control entry" id="remark" name="remark" style="width: 50%">
                </div>

            </form>
            <div class="box-footer">
                <button class="btn btn-info" data-event="submit-addSelectTime">确定</button>
                &nbsp;
                <button class="btn btn-danger close-model" data-event="submit-close">关闭</button>
            </div>
        </div>
    </div>
</div>


<div id="updateSelectTime-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="50%">
    <div class="box-header">
        <h3 class="box-title">修改时间价格</h3>
    </div>
    <div class="box box-info">
        <div class="box-body">
            <form role="form" method="post" id="updateTimeFrom">
                <input type="hidden" name="id" id="id">

                <div class="form-group">
                    <label>时间(月):</label><br>
                    <input type="text" class="form-control" id="months" name="months" style="width: 50%">
                </div>

                <div class="form-group">
                    <label>价格(元):</label><br>
                    <input type="text" class="form-control" id="money" name="money" style="width: 50%">
                </div>
                <div class="form-group">
                    <label>原价(元):</label><br>
                    <input type="text" class="form-control" id="oldMoney" name="oldMoney" style="width: 50%">
                </div>
                <div class="form-group">
                    <label>特价描述:</label><br>
                    <input type="text" class="form-control entry" id="updateRemark" name="remark" style="width: 50%">
                </div>

                <div class="form-group">
                    <label>类型:</label>
                    <input type="hidden" name="type" id="updateType">
                    <select class="form-control entry" id="typeEdit" style="width: 50%">
                        <option value="0">--类型--</option>
                        <option value="1">首页轮播图</option>
                        <option value="2">推荐商家</option>
                        <option value="3">商品特价</option>
                        <option value="4">红包广告位</option>
                    </select>
                </div>
            </form>
            <div class="box-footer">
                <button class="btn btn-info" data-event="submit-updateSelectTime">确定</button>
                &nbsp;
                <button class="btn btn-danger close-model">关闭</button>
            </div>
        </div>
    </div>
</div>